<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>急救电子病历</title>
<%String path = request.getContextPath(); %>
<link href="<%=path%>/css/firstaid.css" rel="stylesheet" type="text/css"/>


<link rel="stylesheet" type="text/css" href="<%=path%>/css/jquery.fancybox.css?v=2.1.0" media="screen" />
<link rel="stylesheet" href="<%=path%>/css/index.css">
<link rel="stylesheet" href="<%=path%>/css/heartpdf.css">

<link rel="stylesheet" href="http://cache.amap.com/lbs/static/main1119.css"/>
<script type="text/javascript" src="<%=path%>/js/jquery.js"></script>
    <script src="http://cache.amap.com/lbs/static/es5.min.js"></script>
    <script src="http://webapi.amap.com/maps?v=1.3&key=a01e725e4f1ece39a6ee411de8e64c7d"></script>
    <script type="text/javascript" src="http://cache.amap.com/lbs/static/addToolbar.js"></script>
    

<script type="text/javascript" src="<%=path%>/js/jquery.cycle.all.js"></script>
<script type="text/javascript" src="<%=path%>/js/index.js"></script>
<script type="text/javascript" src="<%=path%>/js/jquery.fancybox.js"></script>

 <script type="text/javascript">
  var host = "http://localhost:8080";
    $(function  () {
       var  dataTest="";
       dataTest = showCars();
       /*展示第一辆的病例*/
      if (dataTest!="") {
        getCarPatitent (dataTest);

        window.setTimeout(patientVoice, 10000);
        window.setInterval(carDistance, 20000); 
        window.setInterval(carVoice, 20000);
      }

      var getCar = "";
       //计算车辆的坐标
      carDistance();
       
      initHeartPdf();
      
      clickHeartPdf();
      
    });
    
    //-------------心电图展示相关--------------
    function initHeartPdf(){
    	var leftOffset = ($(window).width() - $(".heart-form").width()) / 2;
        var topOffset = ($(window).height() - $(".heart-form").height()) / 6 - 50;
        $(".heart-form").css("left", leftOffset);
        $(".heart-form").css("top", topOffset);
    }
    
    function displayHeart(formId) {
        if (formId != null) {
            $(".heart-blacklayer").css("display", "block");
            $("#" + formId + "").fadeIn(100);
            $(".heart-table input:first").focus();
        }
    }

     function closeHeart() {
        $(".heart-blacklayer").hide();
        $(".heart-form").fadeOut(100);
    }
     
     function clickHeartPdf(){

    	  $("#heartShow").click(function () {
          var recordid = $("#recordid").val();

          if (recordid=="") {
              return;
          }
          var data = {
              "id": "1",
              "platform": "admin",
              "uid": "213213",
              "parameter": {
              "recordid": recordid,
              "imagetype":"3"
             }
          };
               $.ajax({
                      url: "<%=path%>/resources/queryHeartPdf.htm",
                      type: "POST",
                      dataType: "json",
                      contentType:"application/json",
                      data: JSON.stringify(data),
                    })
                    .done(function(result) {
                       var resultData = $.parseJSON(result);
                      if (resultData.status=="100000") {
                       
                         var val = resultData.result;

                      if (val.imageUrl!=undefined) {
                        $("#showpdf1").attr("href","<%=path%>"+val.imageUrl);
                         displayHeart("showpdf");
                         $("#showpdf1").media({width:800, height:600});
                           
                         }else{
                           alert("无心电图预览!")
                         }
                      }
                      
                    })
                    .fail(function() {
                      console.log("获取心电图信息失败！");
                    });
                    
    	         }
    	      );
    	     
    	      $(".heart-close").click(function () {
    	    	  closeHeart();
    	      });
     }
     
   
     
     //--------心电图展示结束--------

   window.setInterval(function(){
        getCar = getCars();
         
        var car = $("#showcar").text();
        if (getCar!=car) {
          //页面刷新
         window.location.reload();
           //播报语音
           if(getCar==""){
           window.clearInterval(carDistance);
           window.clearInterval(carVoice);
           }
        }

    }, 20000);



/*获取车辆信息*/
 function getCars () {
    /* alert("====调用了showcars======="); */
     var data = {
         "id": "1",
         "platform": "admin",
         "uid": "213213",
         "parameter": {
          "status": "1"
         }
    };

    $.ajax({
        url: "<%=path%>/gps/queryCarPosTohospital.htm",
        type: 'POST',
        contentType:"application/json",
        dataType: 'json',
        data: JSON.stringify(data),
        async : false,
        success: function(result){
           var resultData = $.parseJSON(result);

        if (resultData.status=="100000") {
            
           if (resultData.result=="") {
               getCar = "";
           }
         $.each(resultData.result, function(index, val) {
           getCar = resultData.result[0].license_plate;
          });
  
         }
       }

    });
   
    return getCar;
   }
     
    /**播报患者信息**/
    function patientVoice () {
      /* alert("加载到了函数.."); */
      var pname = $("#name_1").text();
      var psex = $("#sex_1").text();
      var page = $("#age_1").text();
      if (pname=="") {
         pname = "空";
      }
      if (psex=="") {
        psex = "空";
      }
      if (page=="") {
         page = "空";
      }
      var context = "患者姓名"+pname+",性别"+psex+",年龄"+page+",正在赶往医院";
      var param = {"id":1,"platform":"web",
                   "uid":"d4bdb016a3b94a3cb319e6d32ccdf4c3",
                   "parameter":{"video":context}}
     
      $.ajax({
        url: "<%=path%>/voice/getvoice.htm",
        type: 'POST',
        contentType:"application/json",
        dataType: 'json',
        data: JSON.stringify(param),
      })
      .done(function(result) {
        var video = $.parseJSON(result);
        if (video.status=="100000") {
        	 var audioUrl ="data:audio/mp3;base64,"+ video.result;
             new Audio( audioUrl ).play();
		}
       
      })
      .fail(function() {
        console.log("error");
      });
      
      
    }

 var dis1 = true,dis2=true,dis3 = true;

    /*播放汽车位置语音*/
    function carVoice () {
       console.log("语音播报开始!");
       var cardis = $("#cardis").text();
       var id = "";
        
        if (cardis<=2000&&cardis>1000&&dis1) {
            id =1;
            dis1 = false;
            /* console.log("调用我一次======2000"); */
        }else if(cardis<=1000&&cardis>500&&dis2){
            id = 2;
            dis2 = false;
           /*  console.log("调用我一次====1000"); */
        }else if(cardis<=500&&cardis>=0&&dis3){
        	id = 3;
        	dis3 = false;
        	/* console.log("调用我一次==500"); */
        }else{
        	/* console.log("================不符合============"); */
        	return;
        }
        
        /* console.log("调用我一次2000============"); */
       
       var param = {"id":"1",
                    "platform":"android",
                     "uid":"d4bdb016a3b94a3cb319e6d32ccdf4c3",
                     "parameter":{"id":id}};

      $.ajax({
        url: "<%=path%>/voice/getdistancevoice.htm",
        type: 'POST',
        contentType:"application/json",
        dataType: 'json',
        data: JSON.stringify(param),
      })
      .done(function(result) {
        var video = $.parseJSON(result);
        if (video.status=="100000") {
         var audioUrl ="data:audio/mp3;base64,"+ video.result;
         new Audio(audioUrl).play();
        }
        
      })
      .fail(function() {
        console.log("error");
      });
     
   
    }
   
   /***展示车辆***/
   function showCars () {
	  /* alert("====调用了showcars======="); */
     var data = {
         "id": "1",
         "platform": "admin",
         "uid": "213213",
         "parameter": {
          "status": "1"
         }
    };

    $.ajax({
        url: "<%=path%>/gps/queryCarPosTohospital.htm",
        type: 'POST',
        contentType:"application/json",
        dataType: 'json',
        data: JSON.stringify(data),
        async : false,
        success: function(result){
           var resultData = $.parseJSON(result);

        if (resultData.status=="100000") {
           if (resultData.result=="") {
               dataTest = "";
           }
         $.each(resultData.result, function(index, val) {

           dataTest = resultData.result[0].license_plate;
           var  carHtml = "<dd><a href='javascript:;' onclick="+
                "getCarPatitent('"+val.license_plate+"')"+"><img  src='<%=path%>/images/ccar.png' style='vertical-align:middle;'></img></a><span id='showcar'  style='text-align:left;color:#0C9A98;font-size:9px;'>"+val.license_plate+"</span></dd>";
                 $("#car_info").empty();
                $("#car_info").append(carHtml);
           });
         }

       }

    });
   
    return dataTest;
   }


   
   /*查询所有抢救者信息*/
  function initPatientData () {
     var data = {
         "id": "1",
         "platform": "admin",
         "uid": "213213",
         "parameter": {
          "status": "1"
         }
    };

      $.ajax({
      	url: "<%=path%>/patientRecords/queryRecordsByStatus.htm",
      	type: 'POST',
      	contentType:"application/json",
      	dataType: 'json',
      	data: JSON.stringify(data),
      })
      .done(function(result) {
      	 var resultData = $.parseJSON(result);
      	 var datas = resultData.result;
         /*alert("datas is "+datas);*/
      	
      	 if (resultData.status=="100000") {
           var data = datas[0];
      	 	// $.each(datas, function(index,data) {
                 /*展示患者信息*/
                $("#name_1").text(data.patientname);
                if (data.patientsex=="1") {
                    $("#sex_1").text("男");
                }else if (data.patientsex=="0") {
                    $("#sex_1").text("女");
                }

               $("#age_1").text(data.patientage);
                /*展示患者病历信息*/
               $("#zhusu_1").text(data.patientRecord.chiefcomplaint);
               $("#xianbing_1").text(data.patientRecord.primafacie);
               $("#jiwang_1").text(data.patientRecord.pasthealth);
               $("#chubu_1").text(data.patientRecord.primafacie);

               /*var  carHtml = "<dd><a href='javascript:;' onclick="+
                "getCarPatitent('"+data.patientRecord.carlicensplate+"')"+"><img  src='<%=path%>/images/small_car_1.png'></img></a></dd>";
                $("#car_info").append(carHtml);*/


              /*患者检查内科*/
             showCheckResult(data.patientRecord.exams);

      	 	 showTreat(data.patientRecord.treat);
      	 	// });
             // alert(resultData.result.chiefcomplaint);
      	 }
                	  
      })
      .fail(function() {
      	console.log("error");
      });
  }

  /* 展示检查结果*/
  function showCheckResult (checks) {
        // alert("检查的结果是："+checks);
       $.each(checks, function(index, exam) {
        var examp = exam.examposition;
        var exisit = exam.isexits;
        var descrip = exam.description;
        var examtype = exam.examtype;
        if (examp=="jingbu") {
          if (exisit=="yinxing") {
            $("#jingbu_1").text("阴");
          }else if (exisit=="yangxing") {
            $("#jingbu_1").text("阳");
          }
          $("#jingbu_d_1").text(descrip);
        }

        if (examp=="xinzang") {
          if (exisit=="yinxing") {
            $("#xinzang_1").text("阴");
          }else if (exisit=="yangxing") {
            $("#xinzang_1").text("阳");
          }
          $("#xinzang_d_1").text(descrip);
        }

        if (examp=="fubu") {
          if (exisit=="yinxing") {
            $("#fubu_1").text("阴");
          }else if (exisit=="yangxing") {
            $("#fubu_1").text("阳");
          }
          $("#fubu_d_1").text(descrip);
        }

        if (examp=="sizhi") {
          if (exisit=="yinxing") {
            $("#sizhi_1").text("阴");
          }else if (exisit=="yangxing") {
            $("#sizhi_1").text("阳");
          }
          $("#sizhi_d_1").text(descrip);
         }
        if (examp=="shenzhi") {
          if (exisit=="yinxing") {
            $("#shenzhi_1").text("阴");
          }else if (exisit=="yangxing") {
            $("#shenzhi_1").text("阳");
          }
          $("#shenzhi_d_1").text(descrip);
        }

        if (examp=="pifuyanse") {
          if (exisit=="yinxing") {
            $("#pifu_1").text("阴");
          }else if (exisit=="yangxing") {
            $("#pifu_1").text("阳");
          }
          $("#pifu_d_1").text(descrip);
        }

        if (examp=="toubu") {
          if (exisit=="yinxing") {
            $("#toubu_1").text("阴");
          }else if (exisit=="yangxing") {
            $("#toubu_1").text("阳");
          }
          $("#toubu_d_1").text(descrip);
        }

         if (examp=="feibu") {
          if (exisit=="yinxing") {
            $("#feibu_1").text("阴");
          }else if (exisit=="yangxing") {
            $("#feibu_1").text("阳");
          }
          $("#feibu_d_1").text(descrip);
        }
        
         if (examp=="shenjing") {
          if (exisit=="yinxing") {
            $("#shenjing_1").text("阴");
          }else if (exisit=="yangxing") {
            $("#shenjing_1").text("阳");
          }
          $("#shenjing_d_1").text(descrip);
        }

         /*外科检查*/
         if (examp=="waishangbuwei") {
            
             var exampd = exisit.split(",");
             var exampNames = [];

              $.each(exampd, function(index, val) {
                var enames = "";
                 switch(val){
                    case "lunao":
                    enames = "颅脑";
                    break;
                    case "hemian":
                    enames = "颌面";
                    break;
                    case "xiong":
                    enames = "胸";
                    break;
                    case "fu":
                    enames = "腹";
                    break;
                    case "beibu":
                    enames = "背部";
                    break;
                    case "jizhu":
                    enames = "脊柱";
                    break;
                    case "sizhi":
                    enames = "四肢";
                    break;
                 }

                exampNames.push(enames);

              });
               $("#wsbw_1").text(exampNames.join(" "));
              

            }

           
             
             if (examp=="waishangleixing") {
             var  exisitArr = exisit.split(",");
             var exisitName = [];

             $.each(exisitArr, function(index, val) {
                var estr = "";
              switch(val){
                    case "kangfangxing":
                    estr = "开放性";
                    break;
                    case "bihexing":
                    estr = "闭合性";
                    break;
                    case "shaoshang":
                    estr = "烧伤";
                    break;
                 }
                 exisitName.push(estr);
             });
             
            $("#wslx_1").text(exisitName.join(" "));
            }

            if (examp=="jubushangqing") {
                  $("#jbsq_1").text(exisit);
             }

       });
  }
  
   /*展示救治措施*/
  function showTreat (treat) {
     /*给氧方式*/
     var geiyang = treat.oxygenmode;
     var  geiyangarr = geiyang.split(",");
     var  geiyangstr = [];
     $.each(geiyangarr, function(index, val) {
         var geiyangs = "";
         switch(val){
           case "bidaoguan": 
            geiyangs = "鼻导管";
            break;
            case "mianzhao": 
            geiyangs = "";
            break;
            case "qiguanchaguan": 
            geiyangs = "气管插管";
            break;
            case "jianyihuxiqi": 
            geiyangs = "简易呼吸器";
            break;
            case "huxiji": 
            geiyangs = "呼吸机";
            break;
         }
         geiyangstr.push(geiyangs);
     });
      


     $("#geiyang_1").text(geiyangstr.join(" "));
      
      /*已用措施*/
      var yiycuoshi = treat.usedtreatment;
      var yiyongarr = yiycuoshi.split(",");
      var yiyongs = [];
      $.each(yiyongarr,function(index, val) {
         var yiyong = "";
         switch(val){
           case "cpr": 
            yiyong = "CPR";
            break;
            case "xindianjianhu": 
            yiyong = "心电监护";
            break;
            case "linshiqibo": 
            yiyong = "临时起博";
            break;
            case "xitan": 
            yiyong = "吸痰";
            break;
            case "daoniao": 
            yiyong = "导尿";
            break;
            case "xiaweiguan": 
            yiyong = "下胃管";
            break;
            case "xiongqiangpaiqi": 
            yiyong = "胸腔排气";
            break;
            case "cuitu": 
            yiyong = "催吐";
            break;
            case "jiesheng": 
            yiyong = "接生";
            break;
         }
         yiyongs.push(yiyong);
      });


     $("#yiycs_1").text(yiyongs.join(" "));
     $("#qitacs_1").text(treat.othertreatment);

      /*用药内容*/
      var admins = treat.adminmode;
      var adminsArr = admins.split(",");
      var adminsArrs = [];

      $.each(adminsArr,function(index, val) {
         var yongyao = "";
         switch(val){
           case "koufu": 
            yongyao = "口服";
            break;
            case "jiaofu": 
            yongyao = "嚼服";
            break;
            case "shexia": 
            yongyao = "舌下";
            break;
            case "pixia": 
            yongyao = "皮下";
            break;
            case "jingzhu": 
            yongyao = "静注";
            break;
            case "jingdi": 
            yongyao = "静滴";
            break;
            case "qiguannei": 
            yongyao = "气管内";
            break;
            case "gusuikong": 
            yongyao = "骨髓控";
            break;
            case "shuyedun": 
            yongyao = "输液趸";
            break;
         }
         adminsArrs.push(yongyao);
      });

     $("#yoynr_1").text(adminsArrs.join(" "));


     $("#yoynr_d_1").text(treat.adminmodedesc);
      /*外伤措施 */
      var wscshi = treat.traumatreate;
      var wscshiArr = wscshi.split(",");
      var wscshs = [];
      
      $.each(wscshiArr,function(index, val) {
         var ws = "";
         switch(val){
           case "zhixue": 
            ws = "止血";
            break;
            case "baozha": 
            ws = "包扎";
            break;
            case "guding": 
            ws = "固定";
            break;
            case "fuwei": 
            ws = "复位";
            break;
            case "qingchuang": 
            ws = "清创";
            break;
            case "jingtuoguding": 
            ws = "颈托固定";
            break;
            
         }
         wscshs.push(ws);
      });


     $("#wscs_1").text(wscshs.join(" "));

     $("#wsqita_1").text(treat.othertreate);
     
     
   /*相应的用药内容 */
   var oralmedone = treat.oralmedone;
  
    if(oralmedone!=undefined){
      $("#oralmed_1").text(oralmedone);
    }
    var oralmedtwo = treat.oralmedtwo;
    if (oralmedtwo!=undefined) {
    	$("#oralmed_2").text(oralmedtwo);
	}
    
  
    /*肌内注射*/
    var instrumone = treat.instrumone;
    
    if (instrumone!=undefined) {
    	$("#instrum_1").text(instrumone);
	 }
     var instrumtwo = treat.instrumtwo;
     if (instrumtwo!=undefined) {
    	 $("#instrum_2").text(instrumtwo);
	 }

    /*静脉注射*/
    var veinome = treat.veinome;
    if (veinome!=undefined) {
    	 $("#vein_1").text(veinome);
	}
   
    var veintwo = treat.veintwo;
    if (veintwo!=undefined) {
    	$("#vein_2").text(veintwo);
	}
    
  }

   /*查询车辆上的患者信息*/
  function getCarPatitent (val) {
     if (val=="" ){
      return;
     }
       var data = {
         "id": "1",
         "platform": "admin",
         "uid": "213213",
         "parameter": {
          "status": "1",
          "carlicensplate":val
         }
    };
     
    $("#left-car span").text('');
     $.ajax({
       url: "<%=path%>/patientRecords/queryRecordsByCarId.htm",
       type: 'POST',
       dataType: 'json',
       data: JSON.stringify(data),
       contentType:"application/json",
     })
     .done(function(result) {
          var pData =  $.parseJSON(result);
          var status = pData.status;
          var data = pData.result;
          if (status=="100000") {
              
              $("#name_1").text(data.patientname);
                if (data.patientsex=="1") {
                    $("#sex_1").text("男");
                }else if (data.patientsex=="0") {
                    $("#sex_1").text("女");
                }
               $("#age_1").text(data.patientage);
                /*展示患者病历信息*/
               $("#zhusu_1").text(data.patientRecord.chiefcomplaint);
               $("#xianbing_1").text(data.patientRecord.primafacie);
               $("#jiwang_1").text(data.patientRecord.pasthealth);
               $("#chubu_1").text(data.patientRecord.primafacie);
               showCheckResult(data.patientRecord.exams);
               showTreat(data.patientRecord.treat);
               /**显示图片**/
               showPatientPic(data.patientRecord.id);
               $("#recordid").val(data.patientRecord.id);

          }

     })
     .fail(function() {
      /*   alert("查询患者信息失败！"); */
     });
       /*计算相应的车的距离*/
      /* carDistance (val); */

  }

  
  /* 计算车辆的距离*/
  function carDistance () {
    console.log("-----开始计算机距离----------");
	  var carplate = $("#showcar").text();
	  console.log("获取的车牌号是："+carplate);
     //根据编号查询最新坐标
     var data = {
         "id": "1",
         "platform": "web",
         "uid": "213213",
         "parameter": {
          "license_plate": carplate
         }
     };

     $.ajax({
       url: "<%=path%>/gps/queryGpsinfo.htm",
        type: 'POST',
        contentType:"application/json",
        dataType: 'json',
        data: JSON.stringify(data),
     })
     .done(function(result) {
    	 /*alert("查询获取的结果是："+result);*/ 
      var cData =  $.parseJSON(result);
       /* alert("获取的结果是："+result);*/
        if (cData.status=="100000"&&cData.result!=null) {
          var resultData = cData.result;
         /* 车牌、经纬度*/
          var carlicensplate = resultData.license_plate;
          var longitude = resultData.longitude;
          var latitude = resultData.latitude;
         /* alert("经纬度是："+longitude+"  "+latitude);*/
          var lng=new AMap.LngLat(latitude,longitude);
          //医院坐标
          /* 需要修改的医院坐标 */
          var lag=new AMap.LngLat(126.694110, 45.769690);
          var ss=lng.distance(lag);
          /*将米转化成千米*/
          
          var dis = "";
          /* dis = 89000; */
          /* ss = 128900; */
          if (ss<1000) {
            dis = (ss).toFixed(1)+"米";
           }else if(ss>1000){
            dis = (Math.round(ss/100)/10).toFixed(1) + "公里";
          }
          $("#cardetial").empty();
          var html = "<img style='vertical-align:middle;text-align:left;' src='<%=path%>/images/ccar.png'>"+
          "</img> <span   style='text-align:left;width:80;line-height:15px;position:absolute;color:#0C9A98;font-size:9px;'>"+carlicensplate+"<br><span style='color:#0C9A98;width:80;font-size:16px;' >"+dis+"</span></span> <span id='cardis' style='display:none'>"+ss+"</span>";
           $("#cardetial").append(html);
           /* carVoice(ss); */
        }
     })
     .fail(function() {
    /*    alert("计算距离错误!"); */
       console.log("error");
     });
  }

  /*显示患者的图片*/
 function showPatientPic (recordid) {
    /* alert("获取的病历编号是："+recordid);*/
    var data = {"id":1,
                "platform":"web",
                 "uid":"d4bdb016a3b94a3cb319e6d32ccdf4c3",
                 "parameter":{
                  "recordid":recordid
                }};

    $.ajax({
        url: "<%=path%>/resources/queryResources.htm",
        type: 'POST',
        contentType:"application/json",
        dataType: 'json',
        data: JSON.stringify(data),
    })
    .done(function(result) {
         var dataTest = $.parseJSON(result);
         var status = dataTest.status;
         if (status=="100000") {
              $("#picList").empty();
              $("#picList2").empty(); 
            $.each(dataTest.result, function(index, val) {

                var pichtml = "<li><a class='fancybox' href='<%=path%>"+val.imageUrl+"'data-fancybox-group='gallery00'><img src='<%=path%>"+val.imageUrl+"' style='vertical-align:middle;' width='200' height='200' alt='图片无法显示'></a></li>";
                 if (val.imagetype==0) {
                 
                   $("#picList").append(pichtml);
                   
                 }else if(val.imagetype==1){
                  $("#picList2").append(pichtml);
                    
                 } 
               
            });
           
            $("#picBox ul,#picBox2 ul").cycle({
           	 fx: 'fade',
           	 timeout: 2000, 
           	 pause: 1 
            });
            
         $("ul li a:first-child img").css("margin-right","1px");
       	 $("#picBox .fancybox").fancybox();
       	 $("#picBox2 .fancybox").fancybox();
         }
         
    })
    .fail(function() {
      console.log("error");
    })
    .always(function() {
    	/*  $("ul li a:first-child img").css("margin-right","1px");
    	 $(".fancybox").fancybox(); */
      console.log("complete");
    });
    
    
 }


 </script>
<style>
    .fancybox img{
        width:300px;
        height: 200px;
    }
   #left{
    top:85px;
    left:3px;
    width:12px; 
   } 
   #left1{
    top:85px;
    left:1px;
    width:12px; 
   } 
   #right{
    top:85px;
    left:285px;
    width:12px;
   }
   #right1{
    top:85px;
    left:290px;
    width:12px;
   }
   .fancybox-overlay{
    z-index: 999999;
   }
</style>

</head>
<body bgcolor="#181C28" style="overflow:hidden">
   
  <div class="firstaid-toolbar-skin-black">
      <div class="s-sp-menu">
         <a href="<%=path%>/login/show.htm" target="_self">急救远程实况信息</a> 
         <a href="<%=path%>/car/carMap.htm" target="_self">地图及车辆位置信息</a> 
      </div>
  </div>

  <div class="Fnav">
      <span style="color: #888B92;font-size:20px">当前救护车:</span>
     <dl id ="car_info" class="firstaid-tool-bottom">
       <!-- <dt>当前救护车</dt> -->
      <!--  <dd><a href="javascript:;" onclick="getCarPatitent(232)"><img  src="<%=path%>/images/small_car_1.png"></img></a></dd> -->
       <!-- <dd><img src="image/small_car_2.png"></img></dd>
       <dd><img src="image/small_car_3.png"></img></dd> -->
     </dl>
  </div>
    <!-- 整个大的div -->
  <div>
     <!-- 左边的div -->
    <div id="left-car"  class="firstaid-tool-left">
        <div style="height:100%;overflow:hidden;position: relative;" >
           <div id = "cardetial" style="position:relative;float:left; margin-top:15%;margin-left:8%; text-align:left;">
          <!--  <img style="vertical-align:middle;text-align:left;" src="<%=path%>/images/ccar.png" >
           <span  style="text-align:left;position:absolute;color:#EFF2F3;font-size:9px;">点点我2223</span>
            </img> -->
           </div>
           <div id="a1" style=" float:right; margin-right:3%; width:450px;height:300px;">
           </div> 
        </div>
       <!--  心电图预览  -->
       <div>
         <input id="heartShow" type="button" value="查看心电图预览"/>
       </div>
       <!-- 这里放置div即可-->
	 <div id="picBox">
        <ul id="picList">
          <%--   <li><a class="fancybox" href="<%=path%>/images/1.jpg" data-fancybox-group="gallery00"><img src="<%=path%>/images/1.jpg" style="vertical-align:middle;" width="200" height="200" alt="图片无法显示"></a></li>
           <li><a class="fancybox" href="<%=path%>/images/2.jpg" data-fancybox-group="gallery00"><img src="<%=path%>/images/2.jpg" style="vertical-align:middle;" width="200" height="200" alt="图片无法显示"></a></li>
           <li><a class="fancybox" href="<%=path%>/images/3.jpg" data-fancybox-group="gallery00"><img src="<%=path%>/images/3.jpg" style="vertical-align:middle;" width="200" height="200" alt="图片无法显示"></a></li>
           <li><a class="fancybox" href="<%=path%>/images/4.jpg" data-fancybox-group="gallery00"><img src="<%=path%>/images/4.jpg" style="vertical-align:middle;" width="200" height="200" alt="图片无法显示"></a></li>  --%>
        </ul>
        <img id="left" src="<%=path%>/images/left.png" alt="">
        <img id="right" src="<%=path%>/images/right.png" alt="">
    </div> 
    <div id="picBox2">
        <ul id="picList2">
          <%--  <li><a class="fancybox" href="<%=path%>/images/1.jpg" data-fancybox-group="gallery00"><img src="<%=path%>/images/1.jpg" style="vertical-align:middle;" width="200" height="200" alt="图片无法显示"></a></li>
           <li><a class="fancybox" href="<%=path%>/images/2.jpg" data-fancybox-group="gallery00"><img src="<%=path%>/images/2.jpg" style="vertical-align:middle;" width="200" height="200" alt="图片无法显示"></a></li>
           <li><a class="fancybox" href="<%=path%>/images/3.jpg" data-fancybox-group="gallery00"><img src="<%=path%>/images/3.jpg" style="vertical-align:middle;" width="200" height="200" alt="图片无法显示"></a></li>
           <li><a class="fancybox" href="<%=path%>/images/4.jpg" data-fancybox-group="gallery00"><img src="<%=path%>/images/4.jpg" style="vertical-align:middle;" width="200" height="200" alt="图片无法显示"></a></li>  --%>
        </ul>
        <img id="left2" src="<%=path%>/images/left.png" alt="">
        <img id="right2" src="<%=path%>/images/right.png" alt="">
    </div>    

	<!--===========================-->
    </div>
      <!-- 中间分割线 -->
     <div class="center-div-style">
       <hr  style="border:2px dashed #303440;
        border-left:0; width:2px;height:100%"  align="center" ></hr>
         </div> 
     <!-- 右边区域div -->
     <!-- style="border:solid 1px red;" -->
    <div class="firstaid-tool-right">
     <div style ="border:solid 1px #424652;height:190px;" >
           <input id="recordid" type="hidden" value=""/>
           <p style="font-size:18px;color:#F2F3F4;" >
            &nbsp; <strong class="font-style">姓名:</strong><span id="name_1"></span>&nbsp;&nbsp;<strong class="font-style">性别:</strong> <span id="sex_1"></span> &nbsp;&nbsp;<strong class="font-style">年龄:</strong>  <span id="age_1"></span></br>
          </p>
          <ul class="none-list">
            <li>
              <strong class="font-style">主诉:</strong>
              <span id="zhusu_1" ></span>
            </li>
             <li>
              <strong class="font-style">现病史:</strong>
              <span id="xianbing_1"></span>
            </li>
             <li>
              <strong class="font-style">既往史:</strong>
              <span id="jiwang_1"></span>
            </li> 
            <li>
              <strong class="font-style">初步诊断:</strong>
              <span id="chubu_1"></span>
            </li> 
          </ul>
        </div>


        <div  style ="border:solid 1px #424652;float: left;width:100%;overflow:auto;" >
          <h4 class="font-style">体格检查</h4>
          <div style="display:inline;float:left;width:50%;" >  
            <ul class="none-list">
            <li>
              <strong class="font-style">神智情况:</strong>
              <span id="shenzhi_1" ></span>&nbsp;<span id="shenzhi_d_1">
            </li>
             <li>
              <strong class="font-style">皮肤颜色:</strong>
              <span id="pifu_1"></span>&nbsp;<span id="pifu_d_1">
            </li>
            </li>
             <li>
              <strong class="font-style">头部情况:</strong>
              <span id="toubu_1"></span>&nbsp;<span id="toubu_d_1">
            </li> 
            <li>
              <strong class="font-style">颈部情况:</strong>
              <span id="jingbu_1"></span> &nbsp;<span id="jingbu_d_1">
            </li> 
            <li>
              <strong class="font-style">肺部情况:</strong>
              <span id="feibu_1"></span>&nbsp;<span id="feibu_d_1">
            </li> 
            <li>
              <strong class="font-style">心脏情况:</strong>
              <span id="xinzang_1"></span>&nbsp;<span id="xinzang_d_1">
            </li> 
           
          </ul>

          </div>

         
        <div style="display:inline;float:right;width:49%;">
        
          <ul class="none-list">
             <li>
              <strong class="font-style">腹部情况:</strong>
              <span id="fubu_1"></span>&nbsp;<span id="fubu_d_1">
            </li> 
            <li>
              <strong class="font-style">四肢情况:</strong>
              <span id="sizhi_1"></span>&nbsp;<span id="sizhi_d_1">
            </li> 
             <li>
              <strong class="font-style">神经系统:</strong>
              <span id="shenjing_1"></span>&nbsp;<span id="shenjing_d_1">
            </li> 
            <li>
              <strong class="font-style">外伤部位:</strong>
              <span id="wsbw_1" ></span>&nbsp;<span id="shenzhi_d_1"></span>
            </li>
             <li>
              <strong class="font-style">外伤类型:</strong>
              <span id="wslx_1"></span>&nbsp;<span id="pifu_d_1"></span>
            </li>
            <li>
              <strong class="font-style">局部伤情:</strong>
              <span id="jbsq_1"></span>&nbsp;<span id="pifu_d_1"></span>
            </li>
          </ul>
          </div>

           
        </div>

        <div style ="border:solid 1px #424652;
            float:left;width:100%;white-space:normal;word-break:break-all;word-wrap:break-word;overflow:auto;">
            
             <p class="font-style"><B>救治措施</B>
           <div style="display:inline;float:left;width:50%;" >
      
           <ul class="none-list">
            <li>
              <strong class="font-style">给氧方式:</strong>
              <span id="geiyang_1" ></span>
            </li>
             <li>
              <strong class="font-style">已用措施:</strong>
              <span id="yiycs_1"></span>&nbsp;<span id="pifu_d_1"></span>
            </li>
            <li>
              <strong class="font-style">内科其他措施:</strong>
              <span id="qitacs_1"></span>&nbsp;<span id="pifu_d_1"></span>
            </li>
            
           
          </ul>

           </div>

       <div style="display:inline;float:right;width:49%;">
           <ul class="none-list">
           <!--  <li>
              <strong class="font-style">用药内容:</strong>
              <span id="yoynr_1"></span>&nbsp;<span id="yoynr_d_1"></span>
            </li> -->
            <li>
              <strong class="font-style">外伤措施:</strong>
              <span id="wscs_1" ></span>&nbsp;<span id="shenzhi_d_1"></span>
            </li>
             <li>
              <strong class="font-style">外伤其他措施:</strong>
              <span id="wsqita_1"></span>&nbsp;<span id="pifu_d_1"></span>
            </li>
           
          </ul>
          </div>
        </div>
         
        
        <div style ="border:solid 1px #424652;
            float:left;width:100%;white-space:normal;word-break:break-all;word-wrap:break-word;overflow:auto;">
            
             <p class="font-style"><B>用药方式</B>
           <div style="display:inline;float:left;width:50%;" >
      
           <ul class="none-list">
            <li>
              <strong class="font-style">口服药物:</strong>
              <span id="oralmed_1" ></span>&nbsp;
              <span id="oralmed_2" ></span>
            </li>
             <li>
              <strong class="font-style">肌内注射:</strong>
              <span id="instrum_1"></span>&nbsp;<span id="instrum_2"></span>
            </li>
            <li>
              <strong class="font-style">静脉注射(滴注)药物:</strong>
              <span id="vein_1"></span>&nbsp;<span id="vein_2"></span>
            </li>
           
           </ul>

           </div>
        
    </div>

  </div>
  
  <!-- 心电图pdf预览弹层 -->
  <div class="heart-blacklayer">
    </div>
	<div id="showpdf" class="heart-form">
		 <div class="heart-title">
            <span>心电图文件预览</span>
            <div title="关闭" class="heart-close">X</div>
        </div>

        <!--相应的内容区域-->
        <div id="pdfDetail">
            <a id="showpdf1"  href="<%=path%>/fileupload/guice.pdf"></a>
        </div>
	</div>
 

 <script type="text/javascript" src="<%=path%>/ckplayer/ckplayer.js" charset="utf-8"></script>


<script type="text/javascript">
    var flashvars={
        p:1,
        f:'rtmp://123.56.226.16:1935/hls/renqiu',
        c:0, 
        e:1
    };
    var video = ['<%=path%>/fileupload/aa.mp4'];
    /*123.56.226.16*/
    /*192.168.16.24*/
  <%--   var support=['all'];
  CKobject.embedHTML5('a1','ckplayer_a1',450,300,video,flashvars,support);  --%>
   var params={bgcolor:'#FFF',allowFullScreen:true,allowScriptAccess:'always',wmode:'transparent'};
    CKobject.embedSWF('<%=path%>/ckplayer/ckplayer.swf','a1','ckplayer_a1','450','300',flashvars,params);
</script>
<script type="text/javascript" src="<%=path%>/js/jquery.js"></script>
<script type="text/javascript" src="<%=path%>/js/jquery.cycle.all.js"></script>
<script type="text/javascript" src="<%=path%>/js/index.js"></script>
<script type="text/javascript" src="<%=path%>/js/jquery.fancybox.js"></script>

<script type="text/javascript" src="<%=path%>/js/jquery.media.js"></script>

<script type="text/javascript">
/* 
	 $("ul li a:first-child img").css("margin-right","1px");
	 $(".fancybox").fancybox();
	 $("#picBox ul").cycle({
    	 fx: 'fade',
    	 timeout: 4000, 
    	 pause: 1 
     }); */
     

</script> 
	
</body>
</html>